/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tv.global.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author Claudio
 */
@Entity
@Table(name = "GRTSUC")
public class Sucursal implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "GRTSUC_SUCURS", nullable = false, length = 6)
    private String sucurs;
    @Basic(optional = false)
    @Column(name = "GRTSUC_DESCRP", nullable = false, length = 60)
    private String descrp;
    
    public Sucursal() {
    }

    public Sucursal(String sucurs) {
        this.sucurs = sucurs;
    }

    public Sucursal(String sucurs, String descrp) {
        this.sucurs = sucurs;
        this.descrp = descrp;
    }

    public String getDescrp() {
        return descrp;
    }

    public void setDescrp(String descrp) {
        this.descrp = descrp;
    }

    public String getSucurs() {
        return sucurs;
    }

    public void setSucurs(String sucurs) {
        this.sucurs = sucurs;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (sucurs != null ? sucurs.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sucursal)) {
            return false;
        }
        Sucursal other = (Sucursal) object;
        if ((this.sucurs == null && other.sucurs != null) || (this.sucurs != null && !this.sucurs.equals(other.sucurs))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "tv.global.modelo.Sucursales[grtsucSucurs=" + sucurs + "]";
    }

}
